package com.xinke.module.system.model.vo.oauth2;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import javax.validation.constraints.*;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - OAuth2 刷新令牌新增/修改 Request VO")
@Data
public class OAuth2RefreshTokenSaveReqVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2498")
    private Long refreshId;

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "30215")
    @NotNull(message = "用户编号不能为空")
    private Long userId;

    @Schema(description = "刷新令牌", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "刷新令牌不能为空")
    private String refreshToken;

    @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "用户类型不能为空")
    private Integer userType;

    @Schema(description = "客户端编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "客户端编号不能为空")
    private String clientNo;

    @Schema(description = "授权范围")
    private String authScope;

    @Schema(description = "过期时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "过期时间不能为空")
    private LocalDateTime expiresTime;

}